#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#define OFFSETOF(type,mem)   (size_t)&(((type *)0)->mem)
struct S
{
	int a;
	char b;
	int c;
	char d;
};
int main()
{
	printf("%zd\n", OFFSETOF(struct S, a));
	printf("%zd\n", OFFSETOF(struct S, b));
	printf("%zd\n", OFFSETOF(struct S, c));
	printf("%zd\n", OFFSETOF(struct S, d));
	return 0;
}